-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline support #67
Conversation
it sounds like the first issue might be resolvable using a cursor char with a non-zero width and a negative right sidebearing to allow the next character to overlap it. not sure if ab_glyph supports this, and not familiar enough with ttf to know how to set this up, but i will investigate |
Will take a closer look later tonight.
Interesting. The zero-width cursor was relatively easy to set up in FontForge, so that seems worth testing I guess. But if we would need to swap between two special cursors that seems like a bit much.
I have thought about a solution involving inferring the width of spaces but even just putting that thought into text has me feeling a bit queasy. I am probably okay with a bit of multi-line jank since the behavior is optional and can be fixed up when Bevy 0.15 lands. |
there is some space management queasiness waiting for you in here already ... i use the width of the target glyph to adjust for spaces on line up/down, which will be a bit dodgy for non-mono fonts. using something like |
unfortunately i can't see how to set the bounding box separately from the sidebearing in birdfont or fontforge. it seems like it should be possible but i can't really justify any more time. having looked into cosmic a bit more i agree that this pr and the other things i wanted will be much easier once that's released, so i think i will wait for now. |
Do you mean that you are not inclined to get this merged, or just that you are okay with the current level of jank? |
it's up to you for this one. i was mainly referring to the other things on my list (selection hilighting, copy/paste, mouse interactions). most of the navigation implementation here should be possible to replace with much cleaner |
Played around with this a bit and also with trying to do a floating cursor. I think I would prefer to shelve this for now and wait for Bevy 0.15 for this feature. I am also open to doing some work on a branch tracking bevy |
adds multiline support, including cursor up/down and start/end document navigation, and a
NewLine
action for inserting linebreaks.two annoyances:
PositionedGlyph
s)